home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 6
/
FM Towns Free Software Collection 6.iso
/
t_os
/
kuchy
/
kuchy.c
next >
Wrap
C/C++ Source or Header
|
1993-07-08
|
2KB
|
83 lines
/*=========================================================================
GCC PAINT TOOL
By LUCTFER
===========================================================================*/
#pragma on( Pointers_compatible );
#include <stdio.h>
#include <stdlib.h>
#define DWORD(x) *((unsigned int *)(x))
#define WORD(x) *((unsigned short int *)(x))
#define BYTE(x) *((unsigned char *)(x))
void lineput( char *work )
{
char para[12];
int col, ch, x1, y1, x2, y2, flg;
while ( ch != 3 ) { /* wh 1s */
MOS_rdpos( &ch, &x2, &y2 );
if ( ch == 1 ){ /* if 1s */
if ( flg == 1 ) { /* if 2s */
EGB_singleLine( work, x1, y1, x2, y2 );
x1 = x2 ; y1 = y2 ;
} else {
MOS_rdpos( &ch, &x1, &y1 );
flg = 1;
} /* if 2e */
} else {
flg = 0;
} /* if 1e */
if( ch == 2 ){ /* if 3s */
col++ ;
EGB_color( work, 0, col%16 );
} /* if 3e */
} /* wh 1e */
return;
}
void set_egb( char *work, char *mwork )
{
/* EGB_init( work, 1536 ); */
EGB_resolution( work, 0, 0x43 );
EGB_resolution( work, 1, 0x43 );
EGB_writePage( work, 0 );
EGB_color( work, 0, 1 );
EGB_penSize( work, 1 );
EGB_displayPage( work, 1, 3 );
MOS_start( mwork, 4096 );
MOS_resolution( 1, 3 );
MOS_writePage( 1 );
MOS_color( 0, 1 );
/* MOS_pulse( 10, 10 );*/
MOS_disp( 1 );
}
void main()
{
char work[1535];
char mwork[4095];
set_egb( work, mwork );
lineput( work );
MOS_end();
}